package define;

import java.util.Scanner;

public class MethodCallDemo {
    public static double getArea(int r) {
        return Math.PI * r * r; //
    }

    public static double getCircle(int r) {
        return 2 * Math.PI * r;
    }

    public static void main(String[] args) {

        int r;
        Scanner sc = new Scanner(System.in);
        System.out.println("请您输入圆的半径:");
        r = sc.nextInt();
        //Math.round()是取整函数。
        System.out.println("圆的周长是：" + Math.round(getCircle(r)));
        System.out.println("圆的的面积是：" + Math.round(getArea(r)));

    }
}
